<include file="Public/header"/>
<div class="wrapper m-t">
    <div class="ibox float-e-margins">
        <div class="ibox-title">
            <a class="h5 font-bold">新增文本回复</a>
        </div>
        <div class="ibox-content">
            <form class="form-horizontal form-keyword" method="post" action="{:U()}">
                <div class="form-group">
                    <label class="col-sm-2 control-label">回复规则名称</label>
                    <div class="col-sm-6">
                        <input type="text" value="<if condition='$re.msg_name neq null'>{$re.msg_name}</if>" placeholder="请输入回复规则名称" name="msg_name" class="form-control">
                    </div>
                    <div class="col-sm-4">
                        <span class="help-block m-b-none">（您可以给这条规则起一个名字, 方便下次修改和查看）</span>
                    </div>
                </div>
                <div class="line line-dashed line-lg pull-in"></div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">触发关键字</label>
                    <div class="col-sm-6">
                        <input type="text" value="<if condition='$re.keyword neq null'>{$re.keyword}</if>" placeholder="请输入触发关键词" name="keyword" class="form-control">
                    </div>
                    <div class="col-sm-4">
                        <span class="help-block m-b-none">（当用户的对话内容符合以上的关键字定义时，会触发这个回复定义）</span>
                    </div>
                </div>
                <div class="line line-dashed line-lg pull-in"></div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">回复内容</label>
                    <div class="col-sm-6">
                        <textarea class="form-control" placeholder="添加要回复的内容" name="text_msg" rows="6" ><if condition='$re.text_msg neq null'>{$re.text_msg}</if></textarea>
                    </div>
                    <div class="col-sm-4">
                        <span class="help-block m-b-none">（触发关键词回复的内容）</span>
                    </div>
                </div>
                <div class="line line-dashed line-lg pull-in"></div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">状态</label>
                    <div class="col-sm-6">
                        <notempty name="re">
                            <if condition="$re.status eq 1">
                                <input type="radio" value="1" name="status" checked>启用&nbsp;&nbsp;&nbsp;
                                <input type="radio" value="0" name="status">禁用
                                <else/>
                                <input type="radio" value="1" name="status" >启用&nbsp;&nbsp;&nbsp;
                                <input type="radio" value="0" name="status" checked>禁用
                            </if>
                            <input type="hidden" name="kid" value="{$re.kid}"/>
                        </notempty>
                        <empty name="re">
                            <input type="radio" value="1" name="status" checked>启用&nbsp;&nbsp;&nbsp;
                            <input type="radio" value="0" name="status">禁用
                        </empty>


                    </div>

                </div>
                <div class="line line-dashed line-lg pull-in"></div>
                <input type="hidden" value="1" name="msg_type"/>
                <div class="form-group">
                    <div class="col-sm-6 col-sm-offset-2">
                        <button type="submit" class="btn col-lg-2 m-r btn-info ajax-post " target-form="form-keyword">确定</button>
                        <button type="button" onclick="javascript:history.back(-1);return false;"  class="btn col-lg-2 m-r btn-primary">返回</button>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>

<include file="Public/footer"/>